import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

public class Dodiz {
    public static void main(String[] args) {
        fapai();
    }

    public static ArrayList<String> init() {//初始化
        Card a = new Card();
        ArrayList<String> poke = a.poker();
//        System.out.println(Arrays.toString(new ArrayList[]{poke}));
        return poke;
    }

    public static ArrayList<String> xipai() {//洗牌
        ArrayList<String> a = init();
        Collections.shuffle(a);
//        System.out.println(a);
        return a;
    }

    public static void fapai() {//发牌
        ArrayList<String> creds = xipai();
        ArrayList<String> pl1 = new ArrayList<>();
        ArrayList<String> pl2 = new ArrayList<>();
        ArrayList<String> pl3 = new ArrayList<>();
        ArrayList<String> dp = new ArrayList<>();
        for (int i=0;i<creds.size();i++){
            String p=creds.get(i);
            if (i>=51){
                dp.add(p);
            }else if (i%3==0){
                pl1.add(p);
            }else if (i%3==1){
                pl2.add(p);
            }else if (i%3==2){
                pl3.add(p);
            }
        }
        System.out.println(pl1);
        System.out.println(pl2);
        System.out.println(pl3);
        System.out.println(dp);
    }
}
